﻿<!DOCTYPE html>
<html>
<head>
    <title>推送地址管理</title>
    <script src="/js/header.js"></script>
</head>
<body>
    <div class="data-wrap case" id="container">
        <div class="data-tool clearfix">
            <div class="pull-left form-inline ">
                <a class="btn btn-default" data-modal="/view/sysconfig/editpushaddress.html" data-title="新增" data-width="452" data-height="550"><span class="glyphicon glyphicon-plus"></span> 新增</a>
            </div>
            <div class="pull-right">
                <form class="form-inline" id="formSearch" onsubmit="return false;">
                    <div class="input-group">
                        <label class="input-group-addon m5_l">公司名称：</label>
                        <input class="form-control" name="CompanyName" type="text" />
                    </div>
                    <div class="input-group">
                        <label class="input-group-addon m5_l">类型：</label>
                        <select class="form-control" name="type">
                            <option value="0">请选择</option>
                            <option value="1">存款(主)</option>
                            <option value="2">存款(副)</option>
                            <option value="3">付款(主)</option>
                            <option value="4">付款(副)</option>
                        </select>
                    </div>
                    <button type="button" class="btn btn-default m15_l" id="btnSearch"><span class="glyphicon glyphicon-search"></span> 搜索</button>
                </form>
            </div>
        </div>
        <div class="paging">
        </div>

    </div>
    <script type="text/x-dot-template" id="templatePager">
        <div class="data-head table-responsive">
            <table class="table">
                <thead>
                    <tr>
                        <th class="wd200">公司名称</th>
                        <th class="wd100">类型</th>
                        <th class="wd100">顺序</th>
                        <th class="wd400">推送接收地址</th>
                        <th class="wd400">描述</th>
                    </tr>
                </thead>
            </table>
        </div>

        <div class="data-body data-scroll">
            <div class="data-div-view">
                <table class="table table-hover">
                    <tbody>
                        {{~it.tData :item:index}}
                        <tr>
                            <td class="wd200">{{= item.company.companyName }}</td>
                            <td class="wd100">{{= FlashPay.Util.GetApiPushType(item.type) }}</td>
                            <td class="wd100">{{= item.sortNo }}</td>
                            <td class="wd400">{{= item.url }}</td>
                            <td class="wd400">{{= item.description }}</td>
                        </tr>
                        {{~}}
                    </tbody>
                </table>
            </div>
        </div>
        <!-- 必要的分页参数设置 -->
        <input type="hidden" id="TotalCount" value="{{=it.totalCount}}" />
    </script>
    <script type="text/javascript">
        $(function () {
            doSearch();

            $("#btnSearch").click(function () {
                doSearch();
            });
        });

        $(document).keyup(function (event) {
            var keycode = event.which;
            if (keycode == 13) {
                FlashPay.UI.DoSearch();
            }
        });

        function doSearch() {
            FlashPay.UI.Pager(".paging", { templateId: "templatePager", ajax: { url: '/SysConfig/GetPushAddressList', Method: 'Post' } });
        }

        function Tip_success(word) {
            FlashPay.UI.Tip_success(word);
        }
    </script>
</body>
</html>